<aside class="main-sidebar">
    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">

        <!-- Sidebar user panel (optional) -->
        <div class="user-panel">
            <div class="pull-left image">
                <img src="{{gravatar session.user.email}}" class="img-circle" alt="User Image">
            </div>
            <div class="pull-left info">
                <p>{{session.user.username}}</p>
                <!-- Status -->
                <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
            </div>
        </div>

        <!-- Sidebar Menu -->
        <ul class="sidebar-menu">
            <li class="header">管理中心</li>
            <!-- Optionally, you can add icons to the links -->
            {{# equals session.user.role 'admin'}}
                <li {{#if menu}}{{#equals menu 'index'}}class="active"{{/equals}}{{/if}}><a href="/admin"><i class="fa fa-dashboard"></i> <span>概览</span></a></li>
            {{/equals}}
            <li {{#if menu}}{{#equals menu 'p-list'}}class="active"{{/equals}}{{/if}}><a href="/dashboard/p"><i class="fa fa-file-text"></i> <span>文章管理</span></a></li>
            <li {{#if menu}}{{#equals menu 'u-info'}}class="active"{{/equals}}{{/if}}><a href="/dashboard/u"><i class="fa fa-info"></i> <span>修改信息</span></a></li>

            {{#equals session.user.role 'admin'}}
                <li {{#if menu}}{{#equals menu 'admin-user'}}class="active"{{/equals}}{{/if}}><a href="/admin/user"><i class="fa fa-user"></i> <span>用户管理</span></a></li>
                <li {{#if menu}}{{#equals menu 'admin-inviteCode'}}class="active"{{/equals}}{{/if}}><a href="/admin/inviteCode"><i class="fa fa-code"></i> <span>注册码管理</span></a></li>
                <li {{#if menu}}{{#equals menu 'wx'}}class="active"{{/equals}}{{/if}}><a href="/admin/wx"><i class="fa fa-wechat"></i> <span>配置微信</span></a></li>
                <li {{#if menu}}{{#equals menu 'robot'}}class="active"{{/equals}}{{/if}}><a href="/admin/robot"><i class="fa fa-rocket"></i> <span>配置自动回复机器人</span></a></li>
            {{/equals}}
        </ul>
        <!-- /.sidebar-menu -->
    </section>
    <!-- /.sidebar -->
</aside>
